<template>
  <div>
    <div v-if="$route.query.orderId">
      <Detail />
    </div>
    <div v-else>
      <AllOrder />
    </div>
  </div>
</template>

<script setup lang="ts" name="Order">
// 引入路由
import { useRoute } from 'vue-router'
//引入子组件
//@ts-ignore
import Detail from './detail/index.vue'
//@ts-ignore
import AllOrder from './allOrder/index.vue'

//路由
let $route = useRoute()
</script>

<style scoped lang="scss"></style>